package com.hyperboost.controller;

import com.hyperboost.entity.OpportunityCategory;
import com.hyperboost.result.Result;
import com.hyperboost.service.OpportunityCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 机会分类相关接口
 */
@Slf4j
@RestController
@RequestMapping("frontend/opportunityCategory")
public class OpportunityCategoryController {

    @Autowired
    private OpportunityCategoryService opportunityCategoryService;


    /**
     * 获取所有机会分类
     *
     * @return 分类列表集合
     */
    @GetMapping("list")
    public Result<List<OpportunityCategory>> list(){
        return Result.success(opportunityCategoryService.list());
    }
}
